home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_tem_camfalls.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  124 lines

  1. # Jones 3D Cog Script
  2. #
  3. # TEM_CamFalls.cog
  4. #
  5. # [TRM]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8. # ========================================================================================
  9.  
  10. symbols
  11.  
  12.     message     crossed
  13.     message     entered
  14.     message     pulse
  15.  
  16.     thing       player          local
  17.     thing       ghostcampos     nolink
  18.         
  19.     surface     on0
  20.     surface     on1
  21.     surface     on2
  22.     
  23.     sector      off0
  24.     sector      off1
  25.     sector      off2
  26.     sector      off3
  27.     sector      off4
  28.     
  29.     sound       in_Falling=Inxj007.wav      local
  30.     
  31.     # ** music **
  32.     sound       mus_Cue=mus_flourish.wav    local
  33.     
  34.     int         sender          local
  35.     int         set=0           local
  36.     int         set2=0          local
  37.     int         saidIt=0        local
  38.     int         sndChannel      local
  39.     int         ready=0         local
  40.     int         curCam          local                    
  41.  
  42.     flex        fov=45
  43.     flex        wait=0.5
  44.  
  45. end
  46.  
  47. # ========================================================================================
  48.  
  49. code
  50.  
  51. crossed:
  52.  
  53.     sender = GetSenderRef();
  54.     player = GetLocalPlayerThing();
  55.     curCam = GetCurrentCamera();
  56.         
  57.     if((sender == on0) || (sender == on1) || (sender == on2))
  58.     {
  59.         ready = 1;
  60.         
  61.         # play music cue
  62.         PlaySoundLocal(mus_Cue, 1.0, 0.0, 0x0, 0);
  63.         
  64.         # do cutscene stuff
  65.         StartCutscene(0);
  66.         SetActorFlags(player, 0x200000);
  67.     
  68.         SetCameraFocus(2, ghostcampos);
  69.         SetCameraSecondaryFocus(2, player);
  70.         SetCurrentCamera(2);
  71.         SetCameraFOV(fov, 0, 0.0);
  72.         
  73.         #SetPulse(0.1);
  74.     }
  75.     
  76.     return;
  77.  
  78. # ========================================================================================
  79.  
  80. entered:
  81.  
  82.     player = GetLocalPlayerThing();
  83.     sender = GetSenderRef();
  84.     
  85.     if((sender == off0) || (sender == off1) || (sender == off2) || (sender == off3) || (sender == off4))
  86.     {
  87.         if(ready == 1)
  88.         {
  89.             saidIt = 1;
  90.             
  91.             Sleep(1.0);
  92.             
  93.             SetCameraFOV(90, 0, 0.0);
  94.             SetCurrentCamera(curCam);
  95.             ClearActorFlags(player, 0x200000);
  96.             EndCutscene();
  97.         }                    
  98.     }
  99.         
  100.     return;
  101.         
  102. # ========================================================================================
  103.  
  104. pulse:
  105.  
  106.     if((GetMoveStatus(player) == 15) && (saidIt == 0))
  107.     {
  108.         saidIt = 1;
  109.         #PlayVoice(player, in_Falling, 1.0, 0);
  110.         #sndChannel = PlaySoundThing(in_Falling, player, 1.0, 15.0, 20.0, 0x0);
  111.         #sndChannel = PlayVoice(player, in_Falling, 1.0, 0);
  112.         #Sleep(0.5);
  113.         #ChangeSoundPitch(sndChannel, 0.8, 1.0);
  114.         SetPulse(0.0);
  115.     }
  116.         
  117.     
  118.     return;
  119.  
  120. # ========================================================================================    
  121.  
  122. end
  123.  
  124.